﻿using FairyGUI;
using System;
using System.Collections.Generic;
using System.Linq;

public class DiscountPanel : BasePopupPanel
{
    public override void Init()
    {
        base.Init();

        frame = view.GetChild("n1").asCom;

        frame.GetChild("n13").asButton.onClick.Add(OnCancelClick); 
        frame.GetChild("n15").asButton.onClick.Add(OnSureClick);
    }

    public override void Show(params object[] para)
    {
        base.Show(para);
    }

    public override void Close()
    {
        base.Close();
    }

    protected override GComponent CreateView()
    {
        return UIPackage.CreateObject("Main", "panel_disconnect1").asCom;
    }

    protected override bool isClickClose()
    {
        return false;
    }

    private void OnSureClick(EventContext context)
    {
        Close();
        PopupPanelManager.Open<ReconnectPanel>();
    }

    private void OnCancelClick(EventContext context)
    {
        Close();
        PanelManager.Open<LoginPanel>();
    }
}
